package proto

import "fmt"

/*E:\MyFile\WeChat Files\Applet\wx09a75a3a7bb79b59通过F:\个人开发\微信公众号\小程序反编译解密找到所有定义。
搜索t\.S_[0-9A-Za-z_ ]+=[0-9e ]+,
[0-9e ]+,t}\(\);

放在txt中替换,t.替换为\r\n
发送消息列表

接收消息列表
=2  =
=0  =
=  _RSP=

获得对应字符串
(^[A-Z0-9_]+?)=([0-9e]+)
$1:   "$1",
*/

const (
	ProtoHead = 29099
)

type JsData struct {
	Code    byte
	Data    string
	HexData []byte
}

type MsgData struct {
	Head     int16
	TotalLen int32
	Cmd      int32
	PlayerID int64
	Data     interface{}
	HexData  []byte
	JsData   []JsData
}

func GetGameCmdDesc(cmd int32) string {
	if str, ok := gameSendCmdMap[cmd]; ok {
		return str
	}
	if str, ok := gameRecvCmdMap[cmd]; ok {
		return str
	}
	return fmt.Sprintf("game cmd[%d]-unkown", cmd)
}
